<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
      "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
  <title>EPICS exampleCPP/database</title>
  <link rel="stylesheet" type="text/css"
  href="http://epics-pvdata.sourceforge.net/base.css" />
  <link rel="stylesheet" type="text/css"
  href="http://epics-pvdata.sourceforge.net/epicsv4.css" />
  <style type="text/css">
/*<![CDATA[*/
     .about { margin-left: 3em; margin-right: 3em; font-size: .83em}
     table { margin-left: auto; margin-right: auto }
     .diagram { text-align: center; margin: 2.5em 0 }
     body { margin-right: 10% }
/*]]>*/</style>

 <!-- Script that generates the Table of Contents -->
  <script type="text/javascript" src="http://epics-pvdata.sourceforge.net/script/tocgen.js"></script>

</head>

<body>

<div class="head">
<h1>EPICS exampleJava/database</h1>
<h2 class="nocount">2016.08.26</h2>

<h2 class="nocount">Abstract</h2>
<p>database provides a set of PVRecords as defined by pvDatabaseJava.
</p>
</div> <!-- head -->

<div id="toc">
  <h2 class="nocount">Table of Contents</h2>
</div>

<!-- Place what you would like in the Table of Contents, inside the contents div -->
<div id="contents" class="contents">	  
<hr />

<h2>Start exampleDatabase</h2>

<p>The database can then be started on linux as follows:</p>
<pre>
mrk&gt; pwd
/home/epicsv4/master/exampleJava/database
mrk&gt; scripts/exampleDatabase
</pre>
<p>The example database has the following PVRecords:</p>
<pre>
PVRushort
PVRdumbPowerSupply
PVRstring
PVRint
PVRdouble03Array
PVRdouble02
PVRushortArray
PVRdouble01
PVRstructureArray
PVRuint
PVRdouble02Array
PVRbyteArray
PVRhelloPutGet
PVRshort
PVRulongArray
PVRshortArray
PVRdoubleArray
PVRremoveRecord
PVRdouble05Array
PVRubyteArray
PVRrestrictedUnionArray
PVRlong
PVRbooleanArray
PVRulong
PVRfloat
PVRdouble
PVRintArray
PVRlongArray
PVRrestrictedUnion
PVRenum
PVRdouble04Array
PVRdouble01Array
PVRhelloRPC
PVRboolean
PVRstringArray
PVRbyte
PVRubyte
PVRfloatArray
PVRdouble05
PVRdouble04
PVRdouble03
PVRtraceRecord
PVRuintArray
PVRvariantUnion
PVRvariantUnionArray
</pre>
<h2>database/src/org/epics/exampleJava/exampleDatabase</h2>
<p>This directory has the following files:</p>
<dl>
  <dt>ExampleHelloRecord.java</dt>
    <dd>Code for an example that is accessed via channelPutGet</dd>
  <dt>ExampleHelloRPC.java</dt>
    <dd>Code for an example that is accesed via channelRPC</dd>
   <dt>ExampleDatabase..java</dt> 
     <dd>Code that creates many PVRecords.
       Most are soft records but also exampleHello and exampleHelloRPC.
       The code is described in the following sub - section.
       It also has the main program</dd>
</dl>
<h2>ExampleDatabase.java</h2>
<h3>Private methods</h3>
<p>This has a number of private methods:</p>
<dl>
   <dt>createRecords</dt>
     <dd>Given a scalarType this creates an NTScalar and an NTScalarArray record
       of the specified type.</dd>
   <dt>createStructureArrayRecord</dt>
      <dd>Creates a record with a value field that is a structureArray.</dd>
   <dt>createRestrictedUnionRecord</dt>
      <dd>Creates a record with a value field that is a regulav.</dd>
   <dt>createVariantUnionRecord</dt>
      <dd>Creates a record with a value field that a structureArray.</dd>
   <dt>createRestrictedUnionArrayRecord</dt>
      <dd>Creates a record with a value field that a structureArray.</dd>
   <dt>createVariantUnionArrayRecord</dt>
      <dd>Creates a record with a value field that a structureArray.</dd>
   <dt>createDumbPowerSupplyRecord</dt>
      <dd>Creates a record with a value field that a structureArray.</dd>
</dl>

<h3>ExampleDatabase::main</h3>
<p>creates all the PVRecords that make up the
example database.</p>
<p>It:</p>
<dl>
   <dt>createRecords</dt>
     <dd>This is called for each scalarType.</dd>
   <dt>addRecord for PVRenum</dt>
      <dd>Creates <b>PVRenum</b> </dd>
   <dt>createStructureArrayRecord</dt>
      <dd>Creates <b>PVRstructureArray</b> </dd>
   <dt>createRestrictedUnionRecord</dt>
      <dd>Creates <b>PVRrestrictedUnion</b> </dd>
   <dt>createVariantUnionRecord</dt>
       <dd>Creates <b>PVRvariantUnion</b> </dd>
   <dt>createRestrictedUnionArrayRecord</dt>
       <dd>Creates <b>PVRrestrictedUnionArray</b> </dd>
   <dt>createVariantUnionArrayRecord</dt>
       <dd>Creates <b>PVRvariantUnionArray</b> </dd>
   <dt>createDumbPowerSupplyRecord</dt>
       <dd>Creates <b>PVRdumbPowerSupply</b> </dd>
   <dt>addRecord for PVRhelloPutGet</dt>
        <dd>Creates <b>PVRhelloPutGet</b> </dd>
   <dt>registerService for helloRPC</dt>
        <dd>Creates <b>helloRPC</b> </dd>
</dl>

</div> <!-- class="contents" -->
</body>
</html>
